package cn.tedu.spring.bean;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestUserDao {
    /*
    1.获取ApplicationContext对象
    2.获取UserDao对象
    3.打印输出
     */
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("cn.tedu.spring.bean");
        UserDao userDao = context.getBean(UserDao.class);
//        System.out.println(userDao);

        UserService userService = context.getBean(UserService.class);
        System.out.println("userservice="+userService);


    }
}
